package net.qiqbframework.spring.accessing;

import org.springframework.beans.factory.annotation.AnnotatedBeanDefinition;
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
import org.springframework.core.type.AnnotationMetadata;

public class MyClassPathScanningCandidateComponentProvider extends ClassPathScanningCandidateComponentProvider {

    public MyClassPathScanningCandidateComponentProvider() {
        super(false);
    }

    protected boolean isCandidateComponent(AnnotatedBeanDefinition beanDefinition) {
        AnnotationMetadata metadata = beanDefinition.getMetadata();
        return (metadata.isIndependent() && metadata.isInterface());
    }
}
